package com.visionork.android;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Scanner;

import android.net.Uri;

public class LinkParser {
	private URL _url;

	public LinkParser(String urlString) {
		try {
			_url = new URL(urlString);
		} catch (MalformedURLException e) {
			throw new RuntimeException(e);
		}
	}

	ArrayList<String> parse() {
		ArrayList<String> result = new ArrayList<String>();
		
		try {
			InputStream ins = _url.openStream();
			Scanner scaner = new Scanner(ins);
			scaner.findInLine("src=\"http://");
			
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		return result;
	}
}
